<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script>
$(document).ready(function(){
		$('#chrcount').keyup(function(){
			var len = $('#chrcount').val();
			var char = len.length;	
			if(254-char == 0){
				}
			$('#chrcountlength').html(255-char);	
		});
	});
	
	$(document).ready(function(){
		$('#chrcount2').keyup(function(){
			var len = $('#chrcount2').val();
			var char = len.length;	
			if(254-char == 0){
				}
			$('#chrcountlength2').html(255-char);	
		});
	});
</script>

<div id="mws-container" class="clearfix">
<div class="container">
  <div class="mws-panel grid_8">
    <div class="mws-panel-header"> <span class="mws-i-24 i-list">Add Gift</span> </div>
    <div class="mws-panel-body">
      <div class="mws-form-inline">
      <?php  //pr($details); exit; ?>
		<?php echo $form->create(array('controller'=>'setups','action'=>'','method'=>'post','enctype'=>'multipart/form-data', 'class' => 'mws-form')); ?>
        <?php 
		if(isset($details['Gift']['id'])){$details['Gift']['id']=$details['Gift']['id'];}else{$details['Gift']['id']="";}
		echo $this->Form->input('Gift.id', array('type' => 'hidden','value'=>$details['Gift']['id']));?>

        <div class="mws-form-row">
          <label>* Code :</label>
          <div class="mws-form-item small"><?php 
		if(isset($details['Gift']['code'])){$details['Gift']['code']=$details['Gift']['code'];}else{$details['Gift']['code']="";}
		  echo $this->Form->input('Gift.code', array('type' => 'text','value'=>$details['Gift']['code'],'class'=>'mws-textinput','label' =>false));?> </div>
        </div>
        
        <div class="mws-form-row">
          <label>* First Name :</label>
          <div class="mws-form-item small"> <?php 
		if(isset($details['Gift']['f_name'])){$details['Gift']['f_name']=$details['Gift']['f_name'];}else{$details['Gift']['f_name']="";}
		  echo $this->Form->input('Gift.f_name', array('type' => 'text','value'=>$details['Gift']['f_name'],'class'=>'mws-textinput','label' =>false));?> 
          </div>
        </div>
        <div class="mws-form-row">
          <label>* From  Name :</label>
          <div class="mws-form-item small"> <?php 
if(isset($details['Gift']['from_name'])){$details['Gift']['from_name']=$details['Gift']['from_name'];}else{$details['Gift']['from_name']="";}
echo $this->Form->input('Gift.from_name', array('type' => 'text','value'=>$details['Gift']['from_name'],'class'=>'mws-textinput','label' =>false));?> 
          </div>
        </div>
        
        
        <div class="mws-form-row">
          <label>* To  Name :</label>
          <div class="mws-form-item small"> <?php 
if(isset($details['Gift']['to_name'])){$details['Gift']['to_name']=$details['Gift']['to_name'];}else{$details['Gift']['to_name']="";}
echo $this->Form->input('Gift.to_name', array('type' => 'text','value'=>$details['Gift']['to_name'],'class'=>'mws-textinput','label' =>false));?> 
          </div>
        </div>
        <div class="mws-form-row">
          <label>* To  Email :</label>
          <div class="mws-form-item small"> 
	<?php 
		if(isset($details['Gift']['to_email'])){$details['Gift']['to_email']=$details['Gift']['to_email'];}else{$details['Gift']['to_email']="";}
		echo $this->Form->input('Gift.to_email', array('type' => 'text','value'=>$details['Gift']['to_email'],'class'=>'mws-textinput','label' =>false));
    ?> 
          </div>
        </div>
        
        <div class="mws-form-row">
          <label>* Amount :</label>
          <div class="mws-form-item small"> 
	<?php 
        if(isset($details['Gift']['amount'])){$details['Gift']['amount']=$details['Gift']['amount'];}else{$details['Gift']['amount']="";}
        echo $this->Form->input('Gift.amount',
        array('type' => 'text','value'=>$details['Gift']['amount'],
        'class'=>'mws-textinput','label' =>false));
    ?>
        </div>
        </div>
        
                <div class="mws-form-row">
          <label>* Message :</label>
          <div class="mws-form-item small"> 
	<?php 
		if(isset($details['Gift']['message'])){$details['Gift']['message']=$details['Gift']['message'];}else{$details['Gift']['message']="";}
		echo $this->Form->input('Gift.message',
		array('type' => 'textarea','value'=>$details['Gift']['message'],
		'class'=>'mws-textinput','label' =>false));
    ?>
        </div>
        </div>

        <div class="mws-form-row">
          <label>Status Type :</label>
          <div class="mws-form-item 	small">
		<?php 
			if(isset($details['Gift']['status'])){$details['Gift']['status']=$details['Gift']['status'];}else{$details['Gift']['status']="";}
			$options = array('1'=>'Active', '0'=>'Deactive'); 
			echo $this->Form->input('Gift.status', 
			array('type' => 'select','options'=>$options,
			'default'=>$details['Gift']['status'],'class'=>'mws-textinput','empty'=>false,'label' =>false)
			);
        ?>
          </div>
        </div>
        <div class="mws-button-row">
          <input type="submit" class="mws-button black" value="Submit">
        </div>
        </form>
      </div>
      
    </div>
  </div>
</div>
